package com.macro.mall.ums.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.macro.mall.ums.entity.MemberEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 会员 mapper
 *
 * @author xuyanjun
 * @date 2019-12-09
 */
public interface MemberMapper extends BaseMapper<MemberEntity> {

    /**
     * 设置上级id
     *
     * @param userId 用户id
     * @param befId  上级id
     * @return 受影响的行数
     */
    @Update("update ums_member set bef_id=#{befId} where id=#{id};")
    int updateBefId(@Param("id") long userId, @Param("befId") long befId);
}

